package com.homedo.distributed.id.client.gen;

import com.homedo.distributed.id.client.gen.constants.GenTypeConstants;
import com.homedo.distributed.id.client.gen.service.GenBufferService;

public abstract class NoGen {
    private static GenBufferService genBufferService = GenBufferService.getInstance();

    /**
     * 根据业务标志获取全局唯一序号
     *
     * @param bizCode 业务编码
     * @return
     */
    public static String generateNo(String bizCode) {
        return generateNo(bizCode, 0);
    }

    public static String generateNo(String bizCode, int initCacheSize) {
        return genBufferService.gen(bizCode, GenTypeConstants.NO_IRREGULARITY, initCacheSize);
    }
}
